package xyz.xtt.asset.api.enums;

public enum GoodsTypeEnum {
    NFT_CARD(1, "数字藏品实物卡牌"),
    ASSET_WITH_PHYSICAL(2, "拥有实物的数字资产"),
    NFT_VIP_MONTH(3, "数藏藏月度会员"),
    NFT_VIP_SEASON(4, "数藏藏季度会员"),
    NFT_VIP_YEAR(5, "数藏藏年度会员"),
    PERSONAL_MINT_V2(6, "个人铸造手续费"),
    NORMAL(7, "致敬传奇盲盒"),
    ROSE_MINT(8, "情人节玫瑰花铸造"),
    BUY_ASSET_1155(9, "购买平台1155协议资产"),
    C_TO_C(10, "C2C交易"),
    NFT_BLIND_BOX(11,"NFT盲盒"),;
    private final int code;
    private final String desc;

    GoodsTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }
    public int getCode() {
        return code;
    }
    public static GoodsTypeEnum getByCode(int code) {
        for (GoodsTypeEnum goodsTypeEnum : GoodsTypeEnum.values()) {
            if (goodsTypeEnum.getCode() == code) {
                return goodsTypeEnum;
            }
        }
        return null;
     }
}
